package com.dang.alex.service.imp;

import java.util.List;

import com.dang.alex.dao.imp.DAOFactory;
import com.dang.alex.model.Book;
import com.dang.alex.model.Product;
import com.dang.alex.service.serviceInterface.ProductServiceInterface;

public class ProductServiceImp implements ProductServiceInterface {

	@Override
	public Book findById(int id) throws Exception {
		return DAOFactory.getProductDAO().findById(id);
	}

	public List<Product> findByHot(int i) throws Exception{
		return DAOFactory.getProductDAO().findByHot(i);
	}

	public List<Product> findByNew(int i) throws Exception {
		return DAOFactory.getProductDAO().findByNew(i);
	}

}
